# auto generated file
cmake_minimum_required (VERSION 3.6.0)

add_definitions(
-D FG_STD_VARIANT
-D GSSTL_DLL
-D FG_STD_FILESYSTEM
-D FG_STD_STRINGVIEW
#-D FG_OPTIMAL_MEMORY_ORDER
)

#==================================================================================================
# project: GS_STL
#==================================================================================================
set( SOURCES 
	"CompileTime/DefaultType.h"
	"CompileTime/Hash.h"
	"CompileTime/Math.h"
	"CompileTime/TypeList.h"
	"CompileTime/TypeTraits.h"
	"CompileTime/UMax.h"
	"Platforms/WindowsHeader.h"
	"Math/BitMath.h"
	"Math/Bytes.h"
	"Math/Color.h"
	"Math/Math.h"
	"Math/Matrix.h"
	"Math/Rectangle.h"
	"Math/Vec.h"
	"Containers/AnyTypeRef.h"
	"Containers/Appendable.h"
	"Containers/ArrayView.h"
	"Containers/BitTree.h"
	"Containers/CachedIndexedPool.h"
	"Containers/ChunkedIndexedPool.h"
	"Containers/FixedArray.h"
	"Containers/FixedMap.h"
	"Containers/FixedTupleArray.h"
	"Containers/InPlace.h"
	"Containers/Iterators.h"
	"Containers/Optional.h"
	"Containers/Ptr.h"
	"Containers/Singleton.h"
	"Containers/StaticString.h"
	"Containers/StringView.h"
	"Containers/StringViewFwd.h"
	"Containers/StructView.h"
	"Containers/Union.h"
	"Containers/UntypedStorage.h"
	"Algorithms/ArrayUtils.h"
	"Algorithms/Cast.h"
	"Algorithms/EnumUtils.h"
	"Algorithms/Hash.h"
	"Algorithms/StringParser.cpp"
	"Algorithms/StringParser.h"
	"Algorithms/StringUtils.h"
	"Log/Log.cpp"
	"Log/Log.h"
	"Log/TimeProfiler.h"
	"Memory/LinearAllocator.h"
	"Memory/MemUtils.h"
	"Memory/MemWriter.h"
	"Memory/UntypedAllocator.h"
	"CMakeLists.txt"
	"Common.h"
	"Config.h"
	"Defines.h"
	"Export.cpp"
	"Export.h"
	"ThreadSafe/AtomicCounter.h"
	"ThreadSafe/AtomicPtr.h"
	"ThreadSafe/Barrier.cpp"
	"ThreadSafe/Barrier.h"
	"ThreadSafe/DataRaceCheck.h"
	"ThreadSafe/DummyLock.h"
	"ThreadSafe/LfDoubleBuffer.h"
	"ThreadSafe/LfFixedList.h"
	"ThreadSafe/LfFixedStack.h"
	"ThreadSafe/LfIndexedPool.h"
	"ThreadSafe/SpinLock.h"
	"Stream/BufferedStream.h"
	"Stream/FileStream.cpp"
	"Stream/FileStream.h"
	"Stream/MemStream.h"
	"Stream/Stream.cpp"
	"Stream/Stream.h" )
add_library( "GSStl"  SHARED ${SOURCES})
#add_library( "GSStl"  STATIC ${SOURCES})

source_group( "CompileTime" FILES "CompileTime/DefaultType.h" "CompileTime/Hash.h" "CompileTime/Math.h" "CompileTime/TypeList.h" "CompileTime/TypeTraits.h" "CompileTime/UMax.h" )
source_group( "Platforms" FILES "Platforms/WindowsHeader.h" )
source_group( "Math" FILES "Math/BitMath.h" "Math/Bytes.h" "Math/Color.h" "Math/Math.h" "Math/Matrix.h" "Math/Rectangle.h" "Math/Vec.h" )
source_group( "Containers" FILES "Containers/AnyTypeRef.h" "Containers/Appendable.h" "Containers/ArrayView.h" "Containers/BitTree.h" "Containers/CachedIndexedPool.h" "Containers/ChunkedIndexedPool.h" "Containers/FixedArray.h" "Containers/FixedMap.h" "Containers/FixedTupleArray.h" "Containers/InPlace.h" "Containers/Iterators.h" "Containers/Optional.h" "Containers/Ptr.h" "Containers/Singleton.h" "Containers/StaticString.h" "Containers/StringView.h" "Containers/StringViewFwd.h" "Containers/StructView.h" "Containers/Union.h" "Containers/UntypedStorage.h" )
source_group( "Algorithms" FILES "Algorithms/ArrayUtils.h" "Algorithms/Cast.h" "Algorithms/EnumUtils.h" "Algorithms/Hash.h" "Algorithms/StringParser.cpp" "Algorithms/StringParser.h" "Algorithms/StringUtils.h" )
source_group( "Log" FILES "Log/Log.cpp" "Log/Log.h" "Log/TimeProfiler.h" )
source_group( "Memory" FILES "Memory/LinearAllocator.h" "Memory/MemUtils.h" "Memory/MemWriter.h" "Memory/UntypedAllocator.h" )
source_group( "" FILES "CMakeLists.txt" "Common.h" "Config.h" "Defines.h" "Export.cpp" "Export.h")
source_group( "ThreadSafe" FILES "ThreadSafe/AtomicCounter.h" "ThreadSafe/AtomicPtr.h" "ThreadSafe/Barrier.cpp" "ThreadSafe/Barrier.h" "ThreadSafe/DataRaceCheck.h" "ThreadSafe/DummyLock.h" "ThreadSafe/LfDoubleBuffer.h" "ThreadSafe/LfFixedList.h" "ThreadSafe/LfFixedStack.h" "ThreadSafe/LfIndexedPool.h" "ThreadSafe/SpinLock.h" )
source_group( "Stream" FILES "Stream/BufferedStream.h" "Stream/FileStream.cpp" "Stream/FileStream.h" "Stream/MemStream.h" "Stream/Stream.cpp" "Stream/Stream.h" )
target_include_directories( "GSStl" PUBLIC ".." )
target_include_directories( "GSStl" PUBLIC "${FG_EXTERNALS_PATH}" )
target_include_directories( "GSStl" PRIVATE "" )
if (UNIX)
	target_link_libraries( "GSStl" "dl;pthread;stdc++fs" )
endif()
if (UNIX)
	target_compile_definitions( "GSStl" PUBLIC _LARGEFILE_SOURCE )
endif()
if (UNIX)
	target_compile_definitions( "GSStl" PUBLIC _LARGE_FILES )
endif()
target_compile_definitions( "GSStl" PUBLIC "${FG_GLOBAL_DEFINITIONS}" )
if (UNIX)
	target_compile_definitions( "GSStl" PUBLIC _FILE_OFFSET_BITS=64 )
endif()
# compiler
target_compile_definitions( "GSStl" PRIVATE $<$<CONFIG:Debug>: ${PROJECTS_SHARED_DEFINES_DEBUG}> )
target_compile_definitions( "GSStl" PRIVATE $<$<CONFIG:Profile>: ${PROJECTS_SHARED_DEFINES_PROFILE}> )
target_compile_options( "GSStl" PRIVATE $<$<CONFIG:Release>: ${PROJECTS_SHARED_CXX_FLAGS_RELEASE}> )
target_compile_options( "GSStl" PRIVATE $<$<CONFIG:Profile>: ${PROJECTS_SHARED_CXX_FLAGS_PROFILE}> )
target_compile_options( "GSStl" PRIVATE $<$<CONFIG:Debug>: ${PROJECTS_SHARED_CXX_FLAGS_DEBUG}> )
target_compile_definitions( "GSStl" PRIVATE $<$<CONFIG:Release>: ${PROJECTS_SHARED_DEFINES_RELEASE}> )

if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
    set_property(TARGET "GSStl"  PROPERTY DEBUG_POSTFIX _d)
endif()